<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#di {
				width: 200px;
				height: 200px;
				border: solid blue;
				position: relative;
			}
			#mian {
				width: 100px;
				height: 100px;
				margin: auto;
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				background: red;
			}
		</style>
	</head>

	<body>

		<div id="di">
			<div id="mian">
			</div>
		</div>
	</body>

</html>